﻿<phone:PhoneApplicationPage 
     xmlns:my="clr-namespace:Microsoft.Advertising.Mobile.UI;assembly=Microsoft.Advertising.Mobile.UI"  
    x:Class="FinanceCalculators.Views.MortagePayment.MortagePayment"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:tookit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="728" d:DesignWidth="480"
    shell:SystemTray.IsVisible="False" Loaded="PhoneApplicationPage_Loaded">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel Orientation="Horizontal" Margin="0,0,0,0">
            <Image x:Name="imgTitle" Width="71" Height="71" HorizontalAlignment="Left" MouseEnter="imgTitle_MouseEnter" Style="{StaticResource PovitTitle}"/>

            <TextBlock x:Name="tblkhyphen" Text="-" Margin="0,-20,5,0" FontSize="74" Foreground="White"/>
            <TextBlock Text="Mortage Payment" Margin="0,15,0,0" Width="210" FontFamily="Comic Sans MS" Foreground="Red" FontSize="24" FontWeight="Bold" TextWrapping="NoWrap"/>
        </StackPanel>
        <ScrollViewer Grid.Row="1">
            <!--ContentPanel - place additional content here-->
            <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,20,12,0">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <StackPanel Margin="0,20,0,0" Grid.Row="5" Orientation="Horizontal">
                    <TextBlock Height="36" HorizontalAlignment="Left" Margin="0,20,0,0" Name="tbTermOfLoan" Text="Term Of Loan" VerticalAlignment="Top" Width="201" FontSize="25" Foreground="White"/>
                    <TextBox InputScope="TelephoneNumber" Background="White" Text="360" Height="74" HorizontalAlignment="Left" Margin="-4,0,0,0" Name="txtTermOfLoan"  VerticalAlignment="Top" Width="170"  />
                    <TextBlock Text="Months" FontSize="25" Foreground="White"  Margin="0,25,0,0"/>
                    <StackPanel Orientation="Horizontal">
                    </StackPanel>
                </StackPanel>
                <StackPanel Grid.Row="5" Orientation="Horizontal">
                   

                </StackPanel>
                <StackPanel Margin="0,20,0,0" Grid.Row="4" Orientation="Horizontal">
                    <TextBlock Height="53" HorizontalAlignment="Left" Margin="0,0,0,0" Name="tbInterestRate" Text="Interest Rate" VerticalAlignment="Top" Width="184" FontSize="25" Foreground="White"/>
                    <TextBox InputScope="TelephoneNumber" Background="White" Height="74" Text="3.5" HorizontalAlignment="Left" Margin="15,-10,0,0" Name="txtInterestRate" VerticalAlignment="Top" Width="248"  LostFocus="txtInterestRate_LostFocus"  />
                    <TextBlock Text="%" FontSize="25" Foreground="White" Margin="-10,0,0,0" Width="27"/>
                </StackPanel>
                <StackPanel Grid.Row="7" Orientation="Horizontal">
                   
                </StackPanel>
                <StackPanel Margin="0,20,0,0" Grid.Row="2" Orientation="Horizontal">
                    <TextBlock Height="53" HorizontalAlignment="Left" Margin="0,0,0,0" Name="LoanAmount" Text="Loan Amount" VerticalAlignment="Top" Width="184" FontSize="25" Foreground="White"/>
                    <TextBox InputScope="TelephoneNumber" Background="White" Height="74" HorizontalAlignment="Left" Margin="15,-5,0,0" Name="txtLoanAmount" Text="412000" VerticalAlignment="Top" Width="248"/>
                    <TextBlock Text="$" FontSize="25" Margin="-4,0,0,0" Foreground="White" Width="25" />
                </StackPanel>
                <StackPanel Grid.Row="9" Orientation="Horizontal">
                   
                </StackPanel>
                <StackPanel Margin="0,20,0,0" Grid.Row="1" Orientation="Horizontal">
                    <TextBlock Height="56" HorizontalAlignment="Left" Margin="0,0,0,0" Name="tbPrice" Text="Initial Cost" VerticalAlignment="Top"  FontSize="25" Foreground="White"/>
                    <TextBox Height="71" HorizontalAlignment="Left" Margin="80,-10,0,0" Name="txtPrice" Text="573000" VerticalAlignment="Top" Width="248" Background="White" InputScope="TelephoneNumber" />
                    <TextBlock Text="$" FontSize="25" Margin="-4,0,0,0" Foreground="White" Width="25" />
                </StackPanel>
                <StackPanel Margin="0,20,0,0" Grid.Row="11" Orientation="Horizontal">
                   
                </StackPanel>
                <Grid Grid.Row="0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                        <StackPanel Grid.Column="0" Orientation="Horizontal">
                    <TextBlock Height="53" HorizontalAlignment="Left" Margin="0,20,0,0" Text="Registration Date"  VerticalAlignment="Top" Width="194" FontSize="25" Foreground="White"/>
                </StackPanel>
                    <tookit:DatePicker Height="71" x:Name="REg" Margin="7,0,0,0" Grid.Column="1" Background="White" Width="248" HorizontalAlignment="Left" Value="2/3/2012" Grid.Row="1" ValueChanged="REg_ValueChanged_1"/>

                </Grid>
                <StackPanel Grid.Row="3" Margin="0,23,0,0" Orientation="Horizontal">
                    <TextBlock Height="56" Grid.Row="2" HorizontalAlignment="Left" Margin="0,20,0,0"  Text="Home Cost " VerticalAlignment="Top" Width="186" FontSize="25" Foreground="White"/>
                    <TextBox Height="71" HorizontalAlignment="Left" Margin="15,0,0,0" Name="txtHomeCoast" Text="473000" VerticalAlignment="Top" Width="248" Background="White" InputScope="TelephoneNumber" />
                    <TextBlock Text="$" FontSize="25" Margin="-6,10,0,0" Foreground="White" Width="25" />
                </StackPanel>
                <!--<TextBox Height="74" HorizontalAlignment="Left" Margin="220,464,0,0" Name="txtDownPayment" Text="" VerticalAlignment="Top" Width="248" Visibility="Collapsed" IsEnabled="False" />-->
                <!--<TextBlock Height="66" HorizontalAlignment="Left" Margin="0,305,0,0"  Text="Payement" Name="tb" VerticalAlignment="Top" FontSize="25" Width="181" />-->
                <!--<TextBox Height="74" HorizontalAlignment="Left" Margin="220,305,0,0" x:Name="tbPayment"  VerticalAlignment="Top" Width="248" FontSize="25" IsEnabled="False" Visibility="Collapsed"/>-->
                <!--<TextBlock Height="49" HorizontalAlignment="Left" Margin="0,475,0,0" Name="tbDownPayment" Text="Down Payement" VerticalAlignment="Top" Width="226" FontSize="25"/>-->
                <!--<tookit:DatePicker x:Name="REg" Margin="-10,0,0,0" Background="White" Width="248" HorizontalAlignment="Left" Value="2/3/2012" Grid.Row="1" ValueChanged="REg_ValueChanged_1"/>-->

            </Grid>
        </ScrollViewer>

        <my:AdControl x:Name="adcontrol" Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Top" BorderBrush="Transparent" Margin="-2,0,0,0" AdUnitId="81658" Height="80" Width="480" ApplicationId="3c3f42d5-f5a3-48ea-8832-4a07eaabbce5" IsAutoRefreshEnabled="True" ></my:AdControl>
    </Grid>
 
    <!--Sample code showing usage of ApplicationBar-->
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <!--<shell:ApplicationBarIconButton IconUri="/Images/add.png" Text="Calculate" Click="ApplicationBarIconButton_Click"/>-->
            <shell:ApplicationBarIconButton IconUri="/Images/Calculator.png" Text="Calculate" Click="ApplicationBarIconButton_Click_1"/>
            <!--<shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="Button 2"/>-->
            <!--<shell:ApplicationBar.MenuItems>-->
                <!--<shell:ApplicationBarMenuItem Text="AddDetails" Click="ApplicationBarMenuItem_Click"/>-->
                <!--<shell:ApplicationBarMenuItem Text="GetDetails" Click="ApplicationBarMenuItem_Click_1"/>-->
            <!--</shell:ApplicationBar.MenuItems>-->
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

</phone:PhoneApplicationPage>
